// var validatePass = function (rule, value, callback){
//   if(value!=""){
//     var reg = new RegExp("^[0-9]*$");
//     if(!reg.test(value)){
//       callback(new Error("只能输入数字"))
//     }
//   }
// }
const yesNoDicData = [{
  label: "是",
  value: 1
}, {
  label: "否",
  value: 0
}]
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "labelWidth": 165,
  "searchMenuSpan": 6,
  viewBtn: true,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      "display": false,
      "hide": true
    },	  {
      "type": "select",
      "label": "主类型名称",
      "prop": "mainName",
      "dicUrl": "support/swpmticketcardtype/dict",
      "props": {
        "label": "mainName",
        "value": "mainName"
      },
      "search": true,
      "searchLabelWidth": 120,
      "display": false
    },	  {
      "type": "input",
      "label": "主类型英文缩写",
      "prop": "mainEnName",
      "search": true,
      "searchLabelWidth": 120,
      "display": false
    },	  {
      "type": "input",
      "label": "子类型名称",
      "prop": "subName",
      "search": true,
      "searchLabelWidth": 120,
      "display": false
    },	  {
      "type": "input",
      "label": "子类型英文缩写",
      "prop": "subEnName",
      "search": true,
      "searchLabelWidth": 120,
      "display": false
    },{
      "type": "select",
      "label": "状态",
      "prop": "status",
      "search": true,
      "dicData": [{
        "label": "启用",
        "value": "1"
      }, {
        "label": "未启用",
        "value": "0"
      }],
      "searchLabelWidth": 120,
      "display": false
    },  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      "display": false,
      "hide": true
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      "display": false,
      "hide": true
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      "display": false,
      "hide": true
    },	  {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      "display": false,
      "hide": true
    }],
    group: [{
      label: '票卡类型',
      column: [{
        "type": "select",
        "label": "主类型名称",
        "prop": "mainName",
        formslot: true,
        editDisabled: true,
        "dicUrl": "support/swpmticketcardtype/dict",
        rules: [{required: true, message: '请选择主类型名称'}]
      },	  {
        "type": "input",
        "label": "主类型英文缩写",
        "prop": "mainEnName",
        placeholder: ' ',
        disabled: true
      },	  {
        "type": "input",
        "label": "子类型名称",
        "prop": "subName",
        rules: [{required: true, message: '请输入子类型名称'}]
      },	  {
        "type": "input",
        "label": "子类型英文缩写",
        "prop": "subEnName",
        editDisabled: true,
        rules: [{required: true, message: '请输入子类型英文缩写'}]
      },{
		  "type": "select",
		  "label": "子类型分类",
		  "prop": "ticketSubType",		 
		  "dicData":[{
			label: '请选择',
			value: ''
		  },{
			label: '纪念票',
			value: '1'
		  }, {
			label: '日票',
			value: '2'
		  }, {
			label: '计次票',
			value: '3'
		  }, {
			label: '定值票',
			value: '4'
		  }]      
      },{
        "type": "select",
        "label": "状态",
        "prop": "status",
        "dicData": [{
          "label": "启用",
          "value": "1"
        }, {
          "label": "未启用",
          "value": "0"
        }],
        rules: [{required: true, message: '请选择状态'}]
      },	  {
        "type": "checkbox",
        "label": "票区名称",
        "prop": "ticketAreaName",
        "span": 24,
        "dataType": "string",
        "dicUrl": "/support/swpmticketarea/dict",
        "props": {
          "label": "ticketAreaName",
          "value": "id"
        },
        rules: [{required: true, message: '请选择票区'}]
      }]
    },{
      label: '票卡参数',
      column: [{
        "type": "input",
        "label": "车票金额",
        "prop": "ticketAmount",
        "precision": 2,
      },	  {
        "type": "input",
        "label": "车票次数",
        "prop": "ticketCount",
      },    {
        "type": "number",
        "label": "有效期",
        "prop": "expirationDate",
      }]
    }]
}
